#ifndef SOCKET_H_
#define SOCKET_H_

#define SOCK_PATH "socket_path"
#define EL_ERROR (-1)

#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <string.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/un.h>
#include <arpa/inet.h>
#include "semaf.h"

#define EL_ERROR (-1)

int mainSocketServer(struct sockaddr_un*);
int mainSocketCliente(void);
int crearSocket(int*);
int realizarBind(int*,struct sockaddr_un*);
int realizarListen(int);
int aceptarCliente(int,struct sockaddr_un*, int semaf);
int cerrarSocket(int*);
int enviarDatos(char*,int,int);
int recibirDatos(char*,int);
int conectar(int nuevoSocket,struct sockaddr_un local);

#endif
